package com.storm.config.jackson

import com.fasterxml.jackson.databind.ObjectMapper
import com.storm.common.jackson.toKtData
import com.storm.common.jackson.toKtList

class JacksonComponent(val objectMapper: ObjectMapper){

    inline fun <reified T> json2KtData(json: Any?): T? {
        return json.toKtData(objectMapper)
    }

    inline fun <reified T> json2KtList(json:Any?): List<T> {
        return json.toKtList(objectMapper)
    }
}






